package com.young.shop.controller;

import com.young.shop.pojo.entity.Goods;
import com.young.shop.service.GoodsService;
import com.young.shop.service.impl.GoodsServiceimpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/introduction")
public class introductionController extends BaseController{
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String id = req.getParameter("id");
        GoodsService goodsService = new GoodsServiceimpl();
        Goods goods = goodsService.getGoodsById(id);
        writerSucccessBaseRespVoToResponse(resp,goods);
        System.out.println(goods);
    }
}
